package com.factory.react;

public class animalfactory {



    public static animal getmethod(String type){
        animal animal= null;
        switch (type){
            case "cat":
                return new cat();

            case "dog":
                return new dog();
        }

        if (type.equals("dog")){

        }
        if (type.equals("cat")){

        }
        return null;
    }

}
